package com.example.queryexpressdelivery_01.entity;

import java.util.HashMap;
import java.util.Map;

public class UserData {
    //status表示用户的状态，0表示正常，1表示冻结，其他数字看情况加
    private int id;
    private String  account;
    private String phone;
    private String password;
    private String email;
    private String data;
    private String lastlogintime;
    private String status;

    public UserData(int id,String account,String phone,String password,String email,String data,String lastlogintime,String status) {
        this.id = id;
        this.account = account;
        this.phone = phone;
        this.password = password;
        this.email = email;
        this.data = data;
        this.lastlogintime = lastlogintime;
        this.status = status;
    }

    public UserData(String account,String phone,String password,String email,String data,String lastlogintime,String status) {
        this.account = account;
        this.phone = phone;
        this.password = password;
        this.email = email;
        this.data = data;
        this.lastlogintime = lastlogintime;
        this.status = status;
    }

    public int getId() {
        return id;
    }

    public String getAccount() {
        return account;
    }

    public String getPhone() {
        return phone;
    }

    public String getPassword() {
        return password;
    }

    public String getEmail() {
        return email;
    }

    public String getData() {
        return data;
    }

    public String getLastlogintime() {
        return lastlogintime;
    }

    public String getStatus() {
        return status;
    }

    public void setData(String data){
        this.data = data;
    }

    public Map<String,String> toStringMap() {
        Map<String,String> result = new HashMap<>();
        result.put("id", String.valueOf(id));
        result.put("account", account);
        result.put("phone", phone);
        result.put("password", password);
        result.put("email", email);
        result.put("data", data);
        result.put("lastlogintime", lastlogintime);
        result.put("status",status);
        return result;
    }

}
